
function [ result ] = Nav_eps_tdoa3d(base_lines, x, y, z)

result = 0.0;

[n_lines, nc] = size(base_lines);

for n = 1:n_lines
   
   result = result + (sqrt((base_lines(n, 1) - x)^2 +...
                           (base_lines(n, 2) - y)^2 +...
                           (base_lines(n, 3) - z)^2) -...
                      sqrt((base_lines(n, 4) - x)^2 +...
                           (base_lines(n, 5) - y)^2 +...
                           (base_lines(n, 6) - z)^2) -...
                      base_lines(n, 7))^2;
                  
end